/**
 * @file
 */
#ifndef CANONICAL_GRAPH_H
#define CANONICAL_GRAPH_H

#include <iostream>
#include <vector>
#include <string>

#include <sstream>

#include "permutation.h"
#include "vector_appender.h"

/**
 * 
 */
class CanonicalGraph
{
public:
  CanonicalGraph(int vertices);
  ~CanonicalGraph();

  bool add_vertex(int id, int label);
  bool add_edge(int v1_id, int v2_id, int label);

  bool swap_vertices(int loc1, int loc2);
  bool swap_edges(int loc1, int loc2);

  void sort_vertices();

  void generate_order_adjacency(std::vector<int> given);
  void create_adjacency_copy();
  void init_adjacency_min();
  void update_adjacency_min();
  void generate_canonical_label(std::string *result);
private:
  int vertices_;
  int *vertex_labels_;
  int *adjacency_matrix_;
  int *adjacency_matrix_copy_;
  int *adjacency_matrix_min_;
};

#endif // CANONICAL_GRAPH_H
